package com.cgsrp.cgsrp_baby.dao;

import com.cgsrp.cgsrp_baby.domain.Message;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MessageMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Message record);

    int insertSelective(Message record);

    Message selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Message record);

    int updateByPrimaryKey(Message record);

    List<Message> selectByUserId(int userId);

    List<Message> selectByType(int type);

    int updateType(@Param("id") Integer messageId, @Param("type") Integer type);

    int updateState(@Param("id") Integer messageId, @Param("state") Integer state);
}
